<?php
namespace app\admin\controller;
class Api extends Base
{
    /**
     * 上传图片
     * @return [type] [description]
     */
    public function upimg(){
        if(is_post()){
            $rs = m('Attachment','xcom')->upimg();
            if($rs){
                return suc(['url'=>$rs]);
            }else{
                return err(m('Attachment','xcom')->getError());
            }
        }
    }
}
